tg-me.com/PineCodersSquawkBox/192
Last Update:
🌲 #newfeature
Improvements to request.security()
were rolled out. Its expression
parameter now supports arguments of "string" type, and "int[]/float[]/bool[]/color[]/string[]" arrays, including in tuples:
//@version=5
indicator("")
bool barUp = close > open
color barColor = barUp ? color.green : color.red
string barDesc = barUp ? "Bar is UP" : "Bar is DOWN"
bool[] arrayBool = array.from(barUp, barUp[1])
color[] arrayColor = array.from(barColor, barColor[1])
string[] arrayString = array.from(barDesc, barDesc[1])
float[] arrayFloat = array.from(close, open)
sBool = request.security(syminfo.tickerid, "1M", close > open)
sColor = request.security(syminfo.tickerid, "1M", barColor)
sString = request.security(syminfo.tickerid, "1M", timeframe.period)
sArrayBool = request.security(syminfo.tickerid, "1M", arrayBool)
sArrayColor = request.security(syminfo.tickerid, "1M", arrayColor)
sArrayString = request.security(syminfo.tickerid, "1M", arrayString)
sArrayFloat = request.security(syminfo.tickerid, "1M", arrayFloat)
[tArrayBool, tArrayColor, tArrayFloat] = request.security(syminfo.tickerid, "1M", [arrayBool, arrayColor, arrayFloat])
if barstate.islast
label.new(bar_index, 0,
sString + "\n" +
str.tostring(sBool) + "\n" +
str.tostring(sArrayBool) + "\n" +
str.tostring(sArrayString) + "\n" +
str.tostring(sArrayFloat) + "\n",
color = array.get(tArrayColor, 0))
BY PineCoders Squawk Box
Warning: Undefined variable $i in /var/www/tg-me/post.php on line 283
Share with your friend now:
tg-me.com/PineCodersSquawkBox/192